import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)

import state from './state.js'
import mutations from './mutations.js'
import actions from './actions.js'
import getters from './getters.js'

// 引入自定义的状态模块文件
import demo from './modules/demo.js'
import Menu from './modules/Menu.js'
import Role from './modules/Role.js'
import Category from './modules/Category.js'
import User from './modules/User.js'
import Specs from './modules/Specs.js'

export default new Vuex.Store({
    state,
    mutations,
    actions,
    getters,
    modules:{
        demo,
        Menu,
        Role,
        Category,
        User,
        Specs,
    }
})
